import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Objects;
import java.util.Set;

/**
 * @author zyj
 * @date 2022年05月23日 14:25
 */
public class LinkedHashSetDemo {
    public static void main(String[] args) {
        Set<Student> set = new LinkedHashSet<>();

        System.out.println(set.add(new Student("1", "张三", "1")));
        System.out.println(set.add(new Student("2", "李四", "2")));
        System.out.println(set.add(new Student("3", "王五", "3")));
        System.out.println(set.add(new Student("3", "王五", "4")));
        for (Student s: set) {
            System.out.println(s);
        }
    }
}